.class public Lcom/donson/momark/view/view/k;
.super Landroid/widget/RelativeLayout;

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private a:Landroid/content/Context;

.field private b:Ljava/lang/Runnable;

.field private d:Z

.field private e:Landroid/widget/RelativeLayout;

.field private g:Lcom/donson/momark/a/r;

.field private h:Ljava/lang/String;

.field private j:Landroid/widget/ImageButton;

.field private w:Landroid/widget/RelativeLayout;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 1

    invoke-direct {p0, p1}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;)V

    new-instance v0, Lcom/donson/momark/view/view/l;

    invoke-direct {v0, p0}, Lcom/donson/momark/view/view/l;-><init>(Lcom/donson/momark/view/view/k;)V

    iput-object v0, p0, Lcom/donson/momark/view/view/k;->b:Ljava/lang/Runnable;

    iput-object p1, p0, Lcom/donson/momark/view/view/k;->a:Landroid/content/Context;

    return-void
.end method

.method static synthetic a(Lcom/donson/momark/view/view/k;)Landroid/content/Context;
    .locals 1

    iget-object v0, p0, Lcom/donson/momark/view/view/k;->a:Landroid/content/Context;

    return-object v0
.end method

.method static synthetic d(Lcom/donson/momark/view/view/k;)Lcom/donson/momark/a/r;
    .locals 1

    iget-object v0, p0, Lcom/donson/momark/view/view/k;->g:Lcom/donson/momark/a/r;

    return-object v0
.end method


# virtual methods
.method public a(Landroid/widget/RelativeLayout;Landroid/widget/RelativeLayout;Lcom/donson/momark/a/r;)Lcom/donson/momark/view/view/k;
    .locals 4

    iput-object p1, p0, Lcom/donson/momark/view/view/k;->e:Landroid/widget/RelativeLayout;

    iput-object p2, p0, Lcom/donson/momark/view/view/k;->w:Landroid/widget/RelativeLayout;

    iput-object p3, p0, Lcom/donson/momark/view/view/k;->g:Lcom/donson/momark/a/r;

    iget-object v0, p3, Lcom/donson/momark/a/r;->e:Lcom/donson/momark/a/a/a;

    invoke-virtual {v0}, Lcom/donson/momark/a/a/a;->j()Ljava/lang/String;

    move-result-object v0

    iput-object v0, p0, Lcom/donson/momark/view/view/k;->h:Ljava/lang/String;

    new-instance v0, Landroid/graphics/drawable/BitmapDrawable;

    iget-object v1, p0, Lcom/donson/momark/view/view/k;->a:Landroid/content/Context;

    const-string v2, "momark_transparent.png"

    invoke-static {v1, v2}, Lcom/donson/momark/util/a;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-direct {v0, v1}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/graphics/Bitmap;)V

    invoke-virtual {p0, v0}, Lcom/donson/momark/view/view/k;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    new-instance v0, Landroid/widget/ImageButton;

    iget-object v1, p0, Lcom/donson/momark/view/view/k;->a:Landroid/content/Context;

    invoke-direct {v0, v1}, Landroid/widget/ImageButton;-><init>(Landroid/content/Context;)V

    iput-object v0, p0, Lcom/donson/momark/view/view/k;->j:Landroid/widget/ImageButton;

    iget-object v0, p0, Lcom/donson/momark/view/view/k;->j:Landroid/widget/ImageButton;

    new-instance v1, Landroid/graphics/drawable/BitmapDrawable;

    iget-object v2, p0, Lcom/donson/momark/view/view/k;->a:Landroid/content/Context;

    const-string v3, "momark_rightdown.png"

    invoke-static {v2, v3}, Lcom/donson/momark/util/a;->a(Landroid/content/Context;Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v2

    invoke-direct {v1, v2}, Landroid/graphics/drawable/BitmapDrawable;-><init>(Landroid/graphics/Bitmap;)V

    invoke-virtual {v0, v1}, Landroid/widget/ImageButton;->setBackgroundDrawable(Landroid/graphics/drawable/Drawable;)V

    new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;

    iget-object v1, p0, Lcom/donson/momark/view/view/k;->a:Landroid/content/Context;

    const/16 v2, 0x96

    invoke-static {v1, v2}, Lcom/donson/momark/util/u;->a(Landroid/content/Context;I)I

    move-result v1

    iget-object v2, p0, Lcom/donson/momark/view/view/k;->a:Landroid/content/Context;

    const/16 v3, 0x28

    invoke-static {v2, v3}, Lcom/donson/momark/util/u;->a(Landroid/content/Context;I)I

    move-result v2

    invoke-direct {v0, v1, v2}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V

    iget-object v1, p0, Lcom/donson/momark/view/view/k;->a:Landroid/content/Context;

    const/4 v2, 0x5

    invoke-static {v1, v2}, Lcom/donson/momark/util/u;->a(Landroid/content/Context;I)I

    move-result v1

    iput v1, v0, Landroid/widget/RelativeLayout$LayoutParams;->topMargin:I

    iget-object v1, p0, Lcom/donson/momark/view/view/k;->a:Landroid/content/Context;

    const/16 v2, 0xf

    invoke-static {v1, v2}, Lcom/donson/momark/util/u;->a(Landroid/content/Context;I)I

    move-result v1

    iput v1, v0, Landroid/widget/RelativeLayout$LayoutParams;->rightMargin:I

    const/16 v1, 0xb

    invoke-virtual {v0, v1}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(I)V

    iget-object v1, p0, Lcom/donson/momark/view/view/k;->j:Landroid/widget/ImageButton;

    invoke-virtual {p0, v1, v0}, Lcom/donson/momark/view/view/k;->addView(Landroid/view/View;Landroid/view/ViewGroup$LayoutParams;)V

    iget-object v0, p0, Lcom/donson/momark/view/view/k;->j:Landroid/widget/ImageButton;

    invoke-virtual {v0, p0}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    return-object p0
.end method

.method public a(Z)V
    .locals 0

    iput-boolean p1, p0, Lcom/donson/momark/view/view/k;->d:Z

    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 4

    iget-object v0, p0, Lcom/donson/momark/view/view/k;->w:Landroid/widget/RelativeLayout;

    instance-of v0, v0, Lcom/donson/momark/view/view/o;

    if-eqz v0, :cond_2

    iget-object v0, p0, Lcom/donson/momark/view/view/k;->w:Landroid/widget/RelativeLayout;

    check-cast v0, Lcom/donson/momark/view/view/o;

    invoke-virtual {v0}, Lcom/donson/momark/view/view/o;->g()V

    :cond_0
    :goto_0
    iget-object v0, p0, Lcom/donson/momark/view/view/k;->g:Lcom/donson/momark/a/r;

    iget-object v0, v0, Lcom/donson/momark/a/r;->e:Lcom/donson/momark/a/a/a;

    invoke-virtual {v0}, Lcom/donson/momark/a/a/a;->b()I

    move-result v0

    if-nez v0, :cond_1

    new-instance v0, Ljava/lang/Thread;

    iget-object v1, p0, Lcom/donson/momark/view/view/k;->b:Ljava/lang/Runnable;

    invoke-direct {v0, v1}, Ljava/lang/Thread;-><init>(Ljava/lang/Runnable;)V

    invoke-virtual {v0}, Ljava/lang/Thread;->start()V

    :cond_1
    const-string v0, "momark"

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v2, "-----------------------apkUrl="

    invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v2, p0, Lcom/donson/momark/view/view/k;->h:Ljava/lang/String;

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-static {v0, v1}, Lcom/donson/momark/util/t;->d(Ljava/lang/String;Ljava/lang/String;)V

    new-instance v0, Lcom/donson/momark/activity/AdActivity;

    invoke-direct {v0}, Lcom/donson/momark/activity/AdActivity;-><init>()V

    iget-object v1, p0, Lcom/donson/momark/view/view/k;->a:Landroid/content/Context;

    const/4 v2, 0x1

    iget-object v3, p0, Lcom/donson/momark/view/view/k;->h:Ljava/lang/String;

    invoke-virtual {v0, v1, v2, v3}, Lcom/donson/momark/activity/AdActivity;->startDownActivity(Landroid/content/Context;ZLjava/lang/String;)V

    return-void

    :cond_2
    iget-object v0, p0, Lcom/donson/momark/view/view/k;->w:Landroid/widget/RelativeLayout;

    instance-of v0, v0, Lcom/donson/momark/view/view/u;

    if-eqz v0, :cond_3

    iget-object v0, p0, Lcom/donson/momark/view/view/k;->w:Landroid/widget/RelativeLayout;

    check-cast v0, Lcom/donson/momark/view/view/u;

    invoke-virtual {v0}, Lcom/donson/momark/view/view/u;->e()V

    goto :goto_0

    :cond_3
    iget-object v0, p0, Lcom/donson/momark/view/view/k;->w:Landroid/widget/RelativeLayout;

    instance-of v0, v0, Lcom/donson/momark/view/view/t;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/donson/momark/view/view/k;->w:Landroid/widget/RelativeLayout;

    check-cast v0, Lcom/donson/momark/view/view/t;

    invoke-virtual {v0}, Lcom/donson/momark/view/view/t;->e()V

    goto :goto_0
.end method
